//
// Created by Castle-Moriarty on 2025/11/1.
//

#include <iostream>
using namespace std;

void max_str(const string& input1,const string input2,string& output) {
    if (input1 > input2) {
        output = input2;
    }else {
        output = input1;
    }
}

void max_int(int input1,int input2,int& output) {
    if (input1 > input2) {
        output = input1;
    }else {
        output = input2;
    }
}

void max_double(double input1,double input2,double* output) {
    if (input1 > input2) {
        *output = input1;
    }else {
        *output = input2;
    }
}

int main() {
    string outstr;
    string string1("Ala");
    string string2("Bob");
    max_str(string1,string2,outstr);
    cout << " max_str: " << outstr << endl;

    int outint;
    int int1 {22};
    int int2{11};
    max_int(int1,int2,outint);
    cout << "max_int: " << outint << endl;

    double outdouble;
    double double1 {22.1};
    double double2 {11.1};
    max_double(double1,double2,&outdouble);
    cout << "max_double: " << outdouble << endl;

    return 0;
}